package com.dp.factory.simple_factory.service.impl;

import com.dp.factory.simple_factory.entity.AwardInfo;
import com.dp.factory.simple_factory.entity.ResponseResult;
import com.dp.factory.simple_factory.service.IFreeGoods;

/**
 * @Author: Ruomeng
 * @Date: 2024/11/26
 * @Description : design-pattern
 * 模拟打折卷发放
 * @Version: 1.0
 */
public class DiscountFreeGoods implements IFreeGoods {

    @Override
    public ResponseResult sendFreeGoods(AwardInfo awardInfo) {
        System.out.println("向用户发送一张打折券：" + awardInfo.getUid() + "，打折券号：" + awardInfo.getAwardNumber());
        return new ResponseResult("200", "打折券发放成功！");
    }
}
